package com.at.bigdata.spark.core.rdd.builder

import org.apache.spark.{SparkConf, SparkContext}

/**
 *
 * @author cdhuangchao3
 * @date 2023/3/19 9:52 PM
 */
object Spark01_RDD_Memory {

  def main(args: Array[String]): Unit = {
    // 环境准备
    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("RDD")
    val sc = new SparkContext(sparkConf)

    // 创建RDD
    val seq = Seq[Int](1,2,3,4)
//    val rdd = sc.parallelize(seq)
    val rdd = sc.makeRDD(seq)

    rdd.collect().foreach(println)

    sc.stop()
  }

}
